package com.test.impl.entity.res;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 功能概述:结果响应体
 *
 * @author maoxiaomeng
 * @date 20220908
 */
@ApiModel("结果响应体")
public class ApiResp<E> {
    @ApiModelProperty(value = "code")
    String code;
    @ApiModelProperty(value = "消息")
    String msg;
    @ApiModelProperty(value = "结果")
    E result;

    public static <E> ApiResp<E> result(E t) {
        ApiResp<E> objectApiResp = new ApiResp<>();
        objectApiResp.result = t;
        return objectApiResp;
    }
}
